package com.jinghua.treatment.controller;

import com.jinghua.treatment.entity.Demo;
import com.jinghua.treatment.service.DemoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by qifan on 2018/2/20.
 */

@RestController
@RequestMapping("/")
public class DemoController {
    @Autowired
    private DemoService studentService;

    @ApiOperation(value = "测试")
    @GetMapping("/getAllStudent")
    private List<Demo> getAllDemo() {
        List<Demo> list = studentService.findAllDemo();
        return list;
    }
}
